﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace PetRock
{
    public class FaceAndName
    {
        private string name, emoticon;
        private Vector2 namePos;
        private SpriteFont spriteFont;

        public FaceAndName(SpriteFont spriteFont, Vector2 namePos)
        {
            this.spriteFont = spriteFont;
            this.namePos = namePos;
            name = "Roqy";
            emoticon = ":|";
        }

        public void setName(string name)
        {
            this.name = name;
        }

        public void setPosition(Vector2 displayPos)
        {
            this.namePos = displayPos;
        }

        public void setFace(string emoticon)
        {
            this.emoticon = emoticon;
        }

        public void Update()
        {

        }

        //Assuming spritebatch began outside, and both name + emoticon drawn above all else(besides UI elements)
        public void Draw(SpriteBatch spriteBatch)
        {
            //spriteBatch.DrawString(spriteFont, name, displayPos, Color.Black);
            //spriteBatch.DrawString(spriteFont, name, namePos, Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 0);
            spriteBatch.DrawString(spriteFont, emoticon, new Vector2((SharedGraphicsDeviceManager.Current.GraphicsDevice.Viewport.Width / 2) - (spriteFont.MeasureString(emoticon).X / 2) - 10, 285), Color.Black, 0, Vector2.Zero, 2, SpriteEffects.None, 0);
        }
    }
}
